﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BLL;
using Models;
using System.Web.Script.Serialization;
using System.Web.SessionState;

namespace Workflow.Project
{
    /// <summary>
    /// PJChoose 的摘要说明
    /// </summary>
    public class PJChoose : IHttpHandler
    {
        PJLogManager objPJLogManager = new PJLogManager();
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int id = Convert.ToInt32(context.Request["Id"]);
            try
            {
                PJLog pjLog = objPJLogManager.GetLogFormId(id);
                JavaScriptSerializer jss = new JavaScriptSerializer();
                string s = jss.Serialize(pjLog);
                context.Response.Write(s);
            }
            catch (Exception ex)
            {
                context.Response.Write(ex.Message.ToString());
            }
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}